Component({
  /**
   * 组件的属性列表
   */
  properties: {
    mainmodel: {
      type: Object,
      value: {}
    },
    menulist: {
      type: Object,
      value: []
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    showmenus: true,
  },

  /**
   * 组件的方法列表
   */
  methods: {
    showclick() {
      console.log("click mainmenu,showmenus value", this.data.showmenus)
      this.triggerEvent('menuexpand', { "expand": this.data.showmenus })
      this.setData({ showmenus: !this.data.showmenus })
    },
    itemclick(e) {
      this.showclick();
      console.log('click submenu', e)
      let info = e.currentTarget.dataset.item
      if (info) {
        this.triggerEvent('menuItemClick', { "iteminfo": info })
      }
    }


  }
})